package com.way;

/**
 * @author 魏彪
 */
public abstract class AbstractConsumer implements Runnable {

    /**
     * 模板方法
     */
    @Override
    public final void run() {
        while (true) {
            consume();
        }
    }

    protected abstract void consume();
}
